import {IListParams} from "@/api/types/common";
import request from "@/utils/request";
import {IAudioInfo, IFileInfo, ImageInfo, VideoInfo} from "./types/static";


export const getVideoList = (params: IListParams) => {
  return request<{
    total: number;
    rows: VideoInfo[];
  }>({
    method: 'GET',
    url: '/static/videoList',
    params
  })
}

export const getImageList = (params: IListParams) => {
  return request<{
    total: number;
    rows: ImageInfo[];
  }>({
    method: 'GET',
    url: '/static/imageList',
    params
  })
}

// 文件列表
export const getFileList = (params: IListParams) => {
  return request<{
    total: number;
    rows: IFileInfo[];
  }>({
    method: 'GET',
    url: '/static/fileList',
    params
  })
}

// 音频列表
export const getAudioList = (params: IListParams) => {
  return request<{
    total: number;
    rows: IAudioInfo[];
  }>({
    method: 'GET',
    url: '/static/audioList',
    params
  })
}

